#include<stdio.h>

int square(int);

int square(int num)
{
	return num * num;

}	

int main()
{

	int num;
	int (*fp)(int);//函数指针

	printf("请输入一个函数：\n");
	scanf("%d",&num);

	fp = square;//函数指针，

	printf("%d * %d = %d\n",num ,num ,(*fp)(num));//(*fp)为函数指针:

	return 0;

}
